Rename the icon-shadow property
authorMatthias Clasen <mclasen@redhat.com>
Sat, 21 Nov 2015 01:25:33 +0000 (20:25 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 21 Nov 2015 01:35:39 +0000 (20:35 -0500)
This is not a standard CSS property, so rename it to
-gtk-icon-shadow. We still support the old name, with a
deprecation warning.

gtk/gtkcssprovider.c
gtk/gtkcssstylepropertyimpl.c

index 60a9d3b9ae696db28cfa3f3bc00407c644c196c6..8d1ebd085ab5c88dad885885ef7d2a82345eeddf 100644 (file)
  * - The optional blur radius is parsed, but it is currently not
  * rendered by the GTK+ theming engine.
  *
- * To set a shadow on an icon, use the `icon-shadow` property instead,
+ * To set a shadow on an icon, use the `-gtk-icon-shadow` property instead,
  * with the same syntax.
  *
  * To set multiple shadows on an element, you can specify a comma-separated list
- * of shadow elements in the `text-shadow` or `icon-shadow` property. Shadows are
+ * of shadow elements in the `text-shadow` or `-gtk-icon-shadow` property. Shadows are
  * always rendered front to back (i.e. the first shadow specified is on top of the
  * others). Shadows can thus overlay each other, but they can never overlay the
  * text or icon itself, which is always rendered on top of the shadow layer.
index 9dd95b3e693dfa01f7a866858bd8e61bb6fcdd6a..793c6d9d07d908f0a3a6facc0516d157042afa33 100644 (file)
@@ -97,7 +97,7 @@ gtk_css_style_property_register (const char *                   name,
                        "initial-value", initial_value,
                        "name", name,
                        NULL);
-  
+
   node->parse_value = parse_value;
   node->query_value = query_value;
   node->assign_value = assign_value;
@@ -1570,7 +1570,7 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           NULL,
                                           _gtk_css_image_value_new (gtk_css_image_builtin_new ()));
-  gtk_css_style_property_register        ("icon-shadow",
+  gtk_css_style_property_register        ("-gtk-icon-shadow",
                                           GTK_CSS_PROPERTY_ICON_SHADOW,
                                           G_TYPE_NONE,
                                           GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
@@ -1579,6 +1579,7 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           NULL,
                                           _gtk_css_shadows_value_new_none ());
+  _gtk_style_property_add_alias ("-gtk-icon-shadow", "icon-shadow");
   gtk_css_style_property_register        ("-gtk-icon-style",
                                           GTK_CSS_PROPERTY_ICON_STYLE,
                                           G_TYPE_NONE,